/*
 * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @Date: 2025-07-02 13:32:15
 * @LastEditors: mkandy44 mkandy44@outlook.com
 * @LastEditTime: 2025-07-07 17:15:32
 * @FilePath: \AML1899\inc\rgb.h
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#ifndef __RGB_H_
#define __RGB_H_

#include "typedef.h"
/* led数量 */
#define LED_NUM 3
#define CODE_0 0x03
#define CODE_1 0x0B
enum _LED_BIT
{
    LEDBIT23= 0x800000,
    LEDBIT22= 0x400000,
    LEDBIT21= 0x200000,
    LEDBIT20= 0x100000,

    LEDBIT19= 0x80000,
    LEDBIT18= 0x40000,
    LEDBIT17= 0x20000,
    LEDBIT16= 0x10000,

    LEDBIT15= 0x8000,
    LEDBIT14= 0x4000,
    LEDBIT13= 0x2000,
    LEDBIT12= 0x1000,

    LEDBIT11= 0x800,
    LEDBIT10= 0x400,
    LEDBIT9= 0x200,
    LEDBIT8= 0x100,

    LEDBIT7= 0x80,
    LEDBIT6= 0x40,
    LEDBIT5= 0x20,
    LEDBIT4= 0x10,

    LEDBIT3= 0x8,
    LEDBIT2= 0x4,
    LEDBIT1= 0x2,
    LEDBIT0= 0x1
};
struct _set_color
{
unsigned char red;
unsigned char green;
unsigned char blue;
};
struct _my_color{

union 
{
struct _set_color color;
uint32_t data;
};

};
struct _rgb_package
{
/* led color */
uint32_t rgb[LED_NUM];
unsigned char color_index;
unsigned char led_on_off;
unsigned char led_index;
};
const uint32_t set_bit[24] = 
{
LEDBIT0, LEDBIT1, LEDBIT2, LEDBIT3, LEDBIT4, LEDBIT5, LEDBIT6, LEDBIT7, LEDBIT8, LEDBIT9, 
LEDBIT10,LEDBIT11, LEDBIT12, LEDBIT13, LEDBIT14, LEDBIT15, LEDBIT16, LEDBIT17, LEDBIT18, LEDBIT19,
LEDBIT20,LEDBIT21, LEDBIT22, LEDBIT23
};

#endif